package ii.zjf.week4.count;

public class Add2 extends BaseAdd {

    public volatile static boolean addFinish = false;

    public static void main(String[] args) {

        Thread thread = new Thread(() -> {

            count.add();
            addFinish = true;

        });

        thread.start();

        while (!addFinish) {

        }

        System.out.println("success : " + count.getCount());

    }
}
